﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace BSCore
{
    public class SpriteSet:GameComponent
    {
        public int ID { get; set; }
        public List<SpriteOffsetSet> SpriteOffsetSets { get; set; }

        public SpriteType SpriteType { get; set; }

        public Direction Direction { get; set; }

        public SpriteSet(BSGame game)
            : base(game)
        {

        }

        public override void Update(GameTime gameTime)
        {
            //foreach (SpriteOffsetSet spriteOffsetSet in SpriteOffsetSets)
            //{
            //    spriteOffsetSet.Sprite.Update(gameTime);
            //}
            base.Update(gameTime);
        }

        public void Draw(SpriteBatch spriteBatch, Vector2 position)
        {
            foreach (SpriteOffsetSet spriteOffsetSet in SpriteOffsetSets)
            {
                spriteOffsetSet.Sprite.Draw(spriteBatch,
                    new Vector2(
                        position.X + spriteOffsetSet.Offset.X,
                        position.Y + spriteOffsetSet.Offset.Y));
            }
        }

    }
}
